#if !defined(CoroutineHeader)
#define CoroutineHeader

// Idea from Simon Tatham, also author of PuTTY
#define crBegin     switch(this->state) { case 0:
#define crReturn(x) \
  do { this->state = __LINE__; return x; case __LINE__:; } while(0)
#define crEnd       }

#endif
